import { pget, ppostJson,  } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';
/**
 * 列表数据
 * @param query
 * @returns
 */
export async function getList(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-receivable/orderreceivable/page`, params);
}
/**
 * 统计
 * @param query
 * @returns
 */
export async function getAllInfor(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-receivable/orderreceivable/count`, params);
}
/**
 * 换车
 * @param params
 * @returns
 */
export async function orderChangeCar(params: any): Promise<any> {
  return ppostJson(
    `${modalApi.finance}/shopec-order-change/orderchange/orderChange`,
    params,
  );
}
/**
 * 应收入详情
 * @param query
 * @returns
 */
export async function getIncomeReceivable(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-receivable/orderreceivable/detail`, {id:params});
}
/**
 * 收款
 * @param params
 * @returns
 */
export async function collection(params: any): Promise<any> {
  return ppostJson(
    `${modalApi.finance}/shopec-order-receivable/orderreceivable/updateOrderReceipt`,
    params,
  );
}
/**
 * 收款流水列表
 * @param query
 * @returns
 */
export async function getCollectionFlow(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-receivable-flow/orderreceivableflow/page`, params);
}
/**
 * 已付流水列表
 * @param query
 * @returns
 */
export async function getPaidCollectionFlow(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-refund-flow/orderrefundflow/page`, params);
}
/**
 * 已付流水总额
 * @param query
 * @returns
 */
export async function getPaidAll(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-refund-flow/orderrefundflow/count`, params);
}
/**
 * 收款流水总额
 * @param query
 * @returns
 */
export async function getCollectionAll(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-receivable-flow/orderreceivableflow/count`, params);
}
/**
 * 已付导出
 * @param query
 * @returns
 */
export async function exportPaidAll(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-refund-flow/orderrefundflow/exportRefundFlow`, params);
}
/**
 * 收款导出
 * @param query
 * @returns
 */
export async function exportCollectionAll(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-receivable-flow/orderreceivableflow/exportReceivableFlow`, params);
}
/**
 * 应退账款
 * @param query
 * @returns
 */
export async function accountsReceivable(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-refund/orderrefund/page`, params);
}
/**
 * 应退账款详情
 * @param query
 * @returns
 */
export async function accountsReceivableInfo(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-refund/orderrefund/detail`, params);
}
/**
 * 退款
 * @param params
 * @returns
 */
export async function refund(params: any): Promise<any> {
  return ppostJson(
    `${modalApi.finance}/shopec-order-refund/orderrefund/updateOrderReceipt`,params);
}
/**
 * 应退账款详情
 * @param query
 * @returns
 */
export async function getSettlement(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-settlement/ordersettlement/page`, params);
}
/**
 * 结算详情
 * @param query
 * @returns
 */
export async function getSettlementinfo(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-settlement/ordersettlement/detail`, params);
}
/**
 * 审核
 * @param params
 * @returns
 */
export async function toExamine(params: any): Promise<any> {
  return ppostJson(
    `${modalApi.finance}/shopec-order-settlement/ordersettlement/auditSettlement`,params);
}
/**
 * 费用减免详情
 * @param query
 * @returns
 */
export async function getFeeReduction(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-abatement/orderabatement/detail`, params);
}
/**
 * 费用减免列表
 * @param query
 * @returns
 */
export async function getFeeReductionPage(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-abatement/orderabatement/page`, params);
}
/**
 * 延租详情
 * @param query
 * @returns
 */
export async function getExtendedLease(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-delay/orderdelay/detail`, params);
}
/**
 * 延租列表
 * @param query
 * @returns
 */
export async function getExtendedLeasePage(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-delay/orderdelay/page`, params);
}
/**
 * 免租详情
 * @param query
 * @returns
 */
export async function getRentFree(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-exemption/orderexemption/detail`, params);
}
/**
 * 免租列表
 * @param query
 * @returns
 */
export async function getRentFreePage(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-exemption/orderexemption/page`, params);
}
/**
 * 费用减免审核
 * @param query
 * @returns
 */
export async function postFreeList(params: any): Promise<any> {
  return ppostJson(
    `${modalApi.finance}/shopec-order-abatement/orderabatement/auditAbatement`,
    params,
  );
}
/**
 * 延租列表
 * @param query
 * @returns
 */
export async function getExtendedLeaseList(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-delay/orderdelay/page`, params);
}
/**
 * 延租审核
 * @param query
 * @returns
 */
export async function postExtendedLease(params: any): Promise<any> {
  return ppostJson(
    `${modalApi.finance}/shopec-order-delay/orderdelay/auditDelay`,
    params,
  )
}
 /**
 * 免租列表
 * @param query
 * @returns
 */
 export async function getExemptionList(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-exemption/orderexemption/page`, params);
}
/**
 * 免租审核
 * @param query
 * @returns
 */
export async function postRentFree(params: any): Promise<any> {
  return ppostJson(
    `${modalApi.finance}/shopec-order-exemption/orderexemption/auditExemption`,
    params,
  )
}
 // 订单关联单据信息
 export async function getOtherList(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-receivable/orderreceivable/otherAssociatedInformation?orderCarNo=${params}
`);
}
/**
 * 费用减免明细
 * @param query
 * @returns
 */
export async function getFeeReductionList(params: any): Promise<any> {
  return pget(`${modalApi.finance}/shopec-order-receivable/orderreceivable/orderAbatementDetailsList`, params);
}